<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>题海 - 游戏</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css">
    <style>
        .game-link {
            display: inline-block;
            text-align: center;
            margin: 20px;
            text-decoration: none;
            color: #333;
            font-size: 18px;
        }
        .game-link img {
            width: 100px;
            height: 100px;
            display: block;
            margin-bottom: 10px;
        }
        .game-link:hover {
            color: #0066cc;
        }
    </style>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-white bg-white">
    <div class="container">
        <a class="navbar-brand" href="/tihai">题海</a>
        <div class="navbar-collapse">
            <ul class="navbar-nav me-auto">
                <li class="nav-item">
                    <a style="color: black" class="nav-link active" href="#">小游戏</a>
                </li>
            </ul>
            <div th:if="${session.currentUser != null} " class="dropdown">
                <a class="btn" href="#" role="button" id="userDropdown"
                   data-bs-toggle="dropdown" aria-expanded="false">
                    <span th:text="${session.currentUser.userName}"></span>
                </a>
                <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="userDropdown">
                    <li>
                        <a class="dropdown-item" href="/tihai/edit">
                            <i class="bi bi-pencil-square me-2"></i>修改信息
                        </a>
                    </li>
                    <li><hr class="dropdown-divider"></li>
                    <li>
                        <a class="dropdown-item" href="/logout">
                            <i class="bi bi-box-arrow-right me-2"></i>退出
                        </a>
                    </li>
                </ul>
            </div>
            <div th:if="${session.currentUser == null} ">
                <span><a style="color: black" class="nav-link active" href="/login">登录</a></span>
            </div>
        </div>
    </div>
</nav>
<div>

<a href="saolei.html" class="game-link">
    <img src="/minesweeper-icon.png" alt="扫雷游戏图标">
    扫雷提示版
</a>
<a href="https://www.ra2web.com/" class="game-link">
    <img src="/ra2web.png" alt="红警游戏图标">
    红警网页版
</a>
</div>


<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>